Interfaces such as Tag Insight and Tag Inspector require tag-specific information to operate properly. For instance, the Tag Inspector needs to know the attributes of the tag being entered, the type of each of those attributes, and, in special instances, the enumerated values of an attribute. Individual tag definition files store this information.
These tag definitions are stored in \Extensions\TagDefs\. For instance, all the information about the APPLET
tag is stored in \Extensions\TagDefs\HTML\Applet.vtm. The definition files are organized in language directories to prevent possible name conflicts between various markup languages.
Note | Whenever you make changes to a VTM file or create a new one, save the file, then press Ctrl+Alt+Shift+C to apply the changes. |
The following features use tag definition files:
You can customize existing tag definitions and create new tag definition files. Every tag editor file contains the following markup structure:
<TAG>
<ATTRIBUTES>
... Defines tag attribute properties and behavior
</ATTRIBUTES>
<ATTRIBCATEGORIES>
... Defines logical grouping for tag attributes
</ATTRIBCATEGORIES>
<EDITORLAYOUT>
... Defines the layout of a tag editor
</EDITORLAYOUT>
<TAGLAYOUT>
... Defines the tag generation template
</TAGLAYOUT>
<TAGDESCRIPTION>
... HTML-based documentation for the tag
</TAGDESCRIPTION>
</TAG>
You can create the definition file in three ways:
The ATTRIBUTES block defines attributes inside the main TAG block. The ATTRIBUTES block can only contain ATTRIB
tags. The following example demonstrates the definition of four tag attributes: VALUE
, TITLE
, ALT
, and ALIGN
.
<ATTRIBUTES>
<ATTRIB NAME="VALUE">
<ATTRIB NAME="TITLE">
<ATTRIB NAME="ALT">
<ATTRIB NAME="ALIGN">
</ATTRIBUTES>
In most cases, features such as Tag Insight require more than just the names of the attributes. You can use the ATTRIB
tag to define the following attributes:
LEFT
, RIGHT
, TOP
, BOTTOM
for the ALIGN
attribute)
The value type for a specific attribute can be specified using the TYPE
attribute in the ATTRIB
tag.
<ATTRIBUTES>
<ATTRIB NAME="VALUE" TYPE="text" />
<ATTRIB NAME="BGCOLOR" TYPE="color"/>
<ATTRIB NAME="FONTFACE" TYPE="font" />
</ATTRIBUTES>
The following table describes the valid value types of the ATTRIB
tag.
Value type | Description |
---|---|
TEXT | Free text content |
ENUMERATED | A list of enumerated values |
COLOR | A color value (name or hex) |
FONT | Font name or font family |
FILEPATH | A full file path |
DIRECTORY | A directory path |
FILENAME | File name only |
RELATIVEPATH | A relative representation of the path |
FLAG | An ON/OFF attribute containing no value |
The following types are used in ColdFusion Studio and JRun Studio ONLY | |
QUERYNAME | A record set name |
EXPRESSION | An language expression |
Enumerated values can be specified for attributes of TYPE="Enumerated." A subtag ATTRIBOPTION is used to specify such values:
<ATTRIB NAME="CHARSET" TYPE="ENUMERATED">
<ATTRIBOPTION VALUE="iso-8859-1" CAPTION="Western" />
<ATTRIBOPTION VALUE="iso-8859-2" CAPTION="Central European (ISO)" />
<ATTRIBOPTION VALUE="iso-8859-8" CAPTION="Hebrew (ISO-Visual)" />
</ATTRIB>
The optional CAPTION attribute specifies the form in which the option appears in the drop-down lists, while the VALUE attribute specifies the underlying value used by the attribute.
The following table describes the ATTRIB tag.
The following table describes the enumerated values of the ATTRIBOPTION
tag.
ATTRIBOPTION Tag Attributes | |
---|---|
VALUE | (Required) The value of the enumeration option. |
CAPTION | (Optional) The visual representation of the option if different from VALUE. |
Use the ATTRIBCATEGORIES
section to define attribute categories. The categories are used to organize the attributes when viewed in the Tag Inspector. The ATTRIBCATEGORIES
block can only contain ATTRIBGROUP
tags. The following example demonstrates the definition of four categories.
<ATTRIBCATEGORIES>
<ATTRIBGROUP NAME="Appearance"
ELEMENTS="BACKGROUND,BGPROPERTIES,LEFTMARGIN,TOPMARGIN"/>
<ATTRIBGROUP NAME="Colors"
ELEMENTS="BGCOLOR,VLINK,ALINK,LINK,TEXT"/>
<ATTRIBGROUP NAME="Misc"
ELEMENTS="GIZMO"/>
</ATTRIBCATEGORIES>
The following table describes the ATTRIBGROUP
tag
ATTRIBGROUP Tag Attributes | |
---|---|
NAME | The name of the category. |
ELEMENTS | The list of attributes included in the category. |